# Copyright (c) 2024 Huawei Technologies Co., Ltd.
#
# openMind is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
#
#          http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
from typing import TYPE_CHECKING

# Direct imports for type-checking
if TYPE_CHECKING:
    from .train import run_train
    from .chat import run_chat
    from .deploy import run_deploy
else:
    from sys import modules as sys_modules
    from ..utils import _LazyModule

    _import_structure = {
        "train": ["run_train"],
        "chat": ["run_chat"],
        "deploy": ["run_deploy"],
        "eval": ["run_eval"],
    }

    sys_modules[__name__] = _LazyModule(
        __name__,
        globals()["__file__"],
        _import_structure,
        module_spec=__spec__,
    )
